﻿<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--jQuery-->
<script type="text/javascript" src="/assets/scripts/jquery-1.5.1.min.js"></script>
<!--form validation-->
<script type="text/javascript" src="/assets/scripts/jquery.validate.js"></script>
<script type="text/javascript" src="/assets/scripts/jquery.datePicker.js"></script>
<script type="text/javascript" src="/assets/scripts/date.js"></script>
<script type="text/javascript" src="/assets/scripts/jquery.qtip.js"></script>
<!--[if IE]><script type="text/javascript" src="/assets/scripts/jquery.bgiframe.js"></script><![endif]-->
<!--css-->
<link rel="stylesheet" href="/assets/css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/assets/css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/assets/css/tabber.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/assets/css/datePicker.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/assets/css/jquery.qtip.css" type="text/css" media="screen" />
<!--[if lt IE 7]>
    <link rel="stylesheet" href="/assets/ie6/ie6.css" type="text/css" media="screen"/>
    <![endif]-->
<!--[if lt IE 8]>
    <script src="/assets/scripts/IE8.js" type="text/javascript"></script>
    <![endif]-->
<script type="text/javascript">
    $(document).ready(function () {
        jQuery.validator.setDefaults({
            errorPlacement: function (error, element) {
                var elem = $(element);
                if (!error.is(':empty')) {
                    elem.qtip({
                        content: error.text(),
                        show: { when: { event: 'none' }, ready: true },
                        hide: false,
                        position: {
                            my: 'center left', // Use the corner...
                            at: 'center right' // ...and opposite corner
                        }
                    });
                }
                else {
                    elem.qtip('destroy');
                }
            },
            success: $.noop
        });

        Date.format = 'yyyy-mm-dd';
        $('.date-pick').datePicker({ startDate: '1996-01-01', clickInput: true }); //initiates datepicker, in this case with a begin date of 01/01/1996; earlier dates cannot be selected
        $("a.close").click(function () { $(this).parent().slideUp(); return false; });  //links with class 'close' close parent div

    });
</script>
